(function($){
	/**
	 * 定义一个类
	 * 这个类的名称叫做blueboz
	 */
	$.blueboz=function(){
		
	}
	
	$.blueboz={
		createPopup:function(param){
			var params={
				id:"bluebozPopup",
				title:"温馨提示",
				msgTitle:"国家主席习近平参观海大",
				msgContent:"请各个部门做好迎接国家主席的准备",
				moreHref:"#"
			}
			
			//覆盖属性
			$.extend(params, param);
			/**
			 * 创建一个对话框，并指定睡醒
			 */
			var maindiv=$("<div>");
			
			var popupHeader=$("<div>");		//标题栏
			var popupContent=$("<div>");	//内容栏
			var popupMore=$("<div>");		//更多栏
				
			var popupTitle=$("<div>");		//题目栏
			var popupInner=$("<div>");		//题目内容主题栏
			
			/**
			 * 主div属性
			 */
			maindiv.css({
				display:"none",
			});
			maindiv.attr({
				id:params.id,
				class:"popup show-grid-danger",
			});
			
			/**
			 * 标题栏属性
			 */
			popupHeader.attr({
				class:"popupHeader"
			});
			
			/*下面开始strong 用于生成下面，append于popupHeader之后
			<strong>
				<i class="icon-white icon-comment">
				</i>
				消息
				</strong>
			*/
			var strongTitle=$("<strong>");
			var iTitile=$("<i>");
			iTitile.attr("class","icon-white icon-comment");
			strongTitle.append(iTitile);
			strongTitle.append($("<span>").text(params.title));
			/**
			 *  <a id="popupClose" href="#" class="popupClose" title="关闭">
			 *   	<i class="icon-white icon-remove"></i>
			 *	</a>
			 */
			var aClose=$("<a>");
			var iClose=$("<i>");
			aClose.attr({
				id:"popupClose",
				class:"popupClose"
			});
			aClose.click(function(){
				/**
				 * 添加动态效果
				 */
				maindiv.hide(1000);
			});
			iClose.attr("class","icon-white icon-remove");
			aClose.append(iClose);
			/**
			 * 标题子
			 */
			popupHeader.append(strongTitle);
			popupHeader.append(aClose);

			/*
			<div class="popupTitle">
				请迎接国家主席
			</div>
			<div class="popupInner">
				明天，国家主席习近平将参观海大，请各部分做好迎接
			</div>
			*/
			popupTitle.attr("class","popupTitle");
			popupTitle.text(params.msgTitle);
			popupInner.attr("class","popupInner");
			popupInner.text(params.msgContent);
			popupContent.attr("class","popupContent");
			/**
			 * 内容子
			 */
			popupContent.append(popupTitle);
			popupContent.append(popupInner);
			
			
			/**
			 * 更多子
			 *  <div class="popupMore">
			 *		<a href="#">查看更多&gt;&gt;</a>
			 *	</div>
			 */
			popupMore.attr("class","popupMore");
			var iMore=$("<a>").attr("href",params.moreHref);
			iMore.text("查看更多>>");
			popupMore.append(iMore);			
			
			maindiv.append(popupHeader);
			maindiv.append(popupContent);
			maindiv.append(popupMore);
			
			return maindiv;
			
		}
	}
		
})($);

/**
<div id="popupMsg" class="popup show-grid-danger" style="display: none;">
			<div class="popupHeader">
				<strong>
					<i class="icon-white icon-comment"></i>
					<span>消息</span>
				</strong>
				<a id="popupClose" href="#" class="popupClose" title="关闭">
					<i class="icon-white icon-remove"></i>
				</a>
			</div>
			
			<div class="popupContent">
				<div class="popupTitle">
					请迎接国家主席
				</div>
				<div class="popupInner">
					明天，国家主席习近平将参观海大，请各部分做好迎接
				</div>
			</div>
			
			<div class="popupMore">
				<a href="#">查看更多&gt;&gt;</a>
			</div>
		</div>
 */